Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active October 4, 2026 22:56
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@denilsonsa
denilsonsa / List of alternative launchers for Android TV.md
Last active October 4, 2026 22:43
List of alternative launchers for Android TV

This was originally shared on reddit, but for some reason I cannot update it anymore. I've now mirrored it as this GitHub Gist.

List of alternative launchers for Android TV

For whatever reason, it's really difficult to discover alternative launchers for Android TV. Sure, you can find a couple of them, but there are so many terrible results that you will end up wasting quite some time.

Thus, I've compiled this list of alternative Android TV launchers. It's not comprehensive (I'm certain I missed some, please suggest them in comments); I'm not endorsing any particular one; and I have not tried all of them. Some are free, some are paid. Some contain ads. Some contain IAP (in-app purchases). Some require too many intrusive permissions.


@korakot
korakot / playwright.py
Created February 10, 2024 10:56
Using playwright in Google Colab
!pip install playwright
!playwright install
# colab need this for async
import nest_asyncio
nest_asyncio.apply()
# start browser, not to use 'with' context
from playwright.async_api import async_playwright
playwright = await async_playwright().start()
browser = await playwright.chromium.launch()
@deepu105
deepu105 / strix-halo-halogen-gufo-llamastash.md
Last active October 4, 2026 22:35
Handover: Halogen + gufo behind LlamaStash on Strix Halo (Qwen3.8 Flash-Next and 27B)

Handover: Halogen + gufo behind LlamaStash on Strix Halo

You are setting up a local LLM stack on an AMD Strix Halo machine (Ryzen AI Max+ 395, Radeon 8060S, gfx1151, 128 GB unified memory) running native Linux. When you finish, the user can start any of these from LlamaStash (TUI, CLI, or its OpenAI/Anthropic proxy), each with ready-made presets:

LlamaStash row Engine Weights
flash-next-halogen Halogen (Docker image) Halogen native v2 .hgn (Qwen3.8-Flash-Next)
Qwen3.8-Flash-Next-UD-Q4_K_XL gufo (native build) Unsloth UD-Q4_K_XL GGUF + Unsloth shared MTP head
Qwen3.8-27B-UD-Q6_K gufo (native build) Unsloth UD-Q6_K GGUF + z-lab DFlash2 draft
@Issykul
Issykul / Office 2019 ISO Links at Microsoft.md
Last active October 4, 2026 22:34
Office 2019 ISO Download Links at Microsoft
@ravarcheon
ravarcheon / theHorse.js
Last active October 4, 2026 22:30
the horse that blocks your screen after a 2 minutes
// ==UserScript==
// @name the horse that stands in your way
// @namespace http://tampermonkey.net/
// @version 2026-03-01
// @description no more than 2 minutes of twitter. the first minute is a clear view, the second minute is where the horse slowly fades in. third minute and beyond there is nothing to see except horse
// @author You
// @match http://*.x.com/*
// @match https://*.x.com/*
// @match http://*.instagram.com/*
// @match https://*.instagram.com/*
@serialx
serialx / fan-control.sh
Last active October 4, 2026 22:28
Fan control for Raspberry Pi 5 running Talos Linux
#!/bin/bash
# BSD Zero Clause License
#
# Copyright (c) 2026 Sung-jin Hong
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@t3dotgg
t3dotgg / try-catch.ts
Last active October 4, 2026 22:25
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }
@VooDisss
VooDisss / README.md
Created March 9, 2026 20:56
llama-server models.ini guide for Qwen3 reranker + embedding + chat models. Fix for Qwen3-Reranker GGUF producing near-zero scores (4.5e-23) with llama.cpp. Covers /v1/rerank endpoint, pooling=rank, cls.output.weight, convert_hf_to_gguf.py proper conversion, models.ini preset reference with all valid keys,

Running Qwen3 Models with llama-server (Embedding + Reranking + Chat)

A practical guide to running multiple Qwen3 models through a single llama-server instance using model routing. Covers embedding, reranking, and chat/vision models.

Tested on Windows with RTX 3090 (24GB VRAM), llama-server build from llama.cpp master branch. Last updated: 2025-03-09.


What you get